Skip to content

Fix tokenizing of comments starting or ending with more than two --#1

Merged
nfrasser merged 1 commit intonfrasser:release-linkify-v4.0.0from
tutao:master
May 7, 2025
Merged

Fix tokenizing of comments starting or ending with more than two --#1
nfrasser merged 1 commit intonfrasser:release-linkify-v4.0.0from
tutao:master

Conversation

@hrb-hub
Copy link

@hrb-hub hrb-hub commented May 6, 2025

Comments ending with more than two dashes are not terminated correctly, resulting in markup following these comments to be included. <!--Comment---><div>Markup</div> is tokenized as a comment of Comment---><div>Markup</div>.

Comments starting with three dashes have their first character clipped. <!---Comment--> is tokenized as a comment of omment.

Comments ending with more than two dashes are not terminated correctly,
resulting in markup following these comments to be included.
`<!--Comment---><div>Markup</div>` is tokenized as a comment of
`Comment---><div>Markup</div>`.

Comments starting with three dashes have their first character clipped.
`<!---Comment-->` is tokenized as a comment of `omment`.
@hrb-hub
Copy link
Author

hrb-hub commented May 6, 2025

I wasn't sure if master was the right branch to merge into, since the repo had no contribution guidelines.

@nfrasser any feedback would be greatly appreciated.
Cheers :)

@nfrasser nfrasser changed the base branch from master to release-linkify-v4.0.0 May 7, 2025 04:33
Copy link
Owner

@nfrasser nfrasser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @hrb-hub!

@nfrasser nfrasser merged commit 5febfd7 into nfrasser:release-linkify-v4.0.0 May 7, 2025
1 check passed
nfrasser added a commit to nfrasser/linkifyjs that referenced this pull request May 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants